<template>
    <div class="per">
        <h1>Hooks的使用</h1>
       <h2>当前求和为：{{sum}}</h2>
        <button @click="add">点我sum+1</button>
        <hr/>
        <img v-for="(item,index) in dogList" :key="index" :src="item">
        <br/>
        <button @click="addDog">点我增加dog</button>
    </div>
</template>

<script setup lang="ts" name="Person">
import useDog from "@/hooks/useDog";
import useSum from "@/hooks/useSum";

let {sum,add,bigSum} = useSum()
let {dogList,addDog} = useDog()
</script>

<style scoped>

button {
    margin-right: 10px;
}
img {
    height: 100px;
}
</style>
